package com.gmall.service.impl;

import java.util.Arrays;
import java.util.List;

import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.stereotype.Component;

import com.gmall.bean.UserAddress;
import com.gmall.service.UserService;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;



//@Service//使用dubbo提供的Service暴露服务
@Component
public class UserServiceImpl implements UserService {
	@HystrixCommand
	@Override
	public List<UserAddress> getUserAddressList(String userId) {
		System.out.println("UserServiceImpl.......");
		UserAddress address1 = new UserAddress(1, "深圳市创业投资大厦", "1", "小明", "010-00000000", "Y");
		UserAddress address2 = new UserAddress(2, "深圳市怡化金融大厦", "2", "小李", "010-11111111", "N");
		System.out.println(address1);
		return Arrays.asList(address1,address2);
	}
}
